package com.hjt.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hjt.common.utils.PageUtils;
import com.hjt.gulimall.product.entity.AttrEntity;
import com.hjt.gulimall.product.entity.AttrVo;
import com.hjt.gulimall.product.vo.AttrResponseVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author huangjingtai
 * @email 970075985@qq.com
 * @date 2021-09-08 16:15:19
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttrPage(String catelogId, Map<String, Object> params, String attrType);

    AttrResponseVo getAttrInfo(Long attrId);

    void updateAttrInfo(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrGroupId);

    PageUtils getNoRelationAttr(String attrGroupId, Map<String, Object> params);

    // 根据attrId列表查找出，所有能够被被检索的attrId(searchType = 1)
    List<Long> selectSearchableAttrIds(List<Long> attrIdList);
}

